{extend name="layout"}
{block name="detail"}

<section class="forms">
    <div class="container-fluid">
        <div class="row">
            <!-- Form Elements -->
            <div class="col-lg-12">
                <div class="card">
                    <div class="card-header d-flex align-items-center">
                        <h3 class="h4 mr-5">晋级规则</h3>
                    </div>
                    <div class="card-body">
                        <form action="{:url('admin/setting/savePromotionRule')}" method="post">
                            <div class="table-responsive">
                                <p class="text-danger">*0表示不限制,没有要求</p>

                                {for start="1" end="10"}
                                <table class="table table-hover">
                                    <tr>
                                        <td class="border" rowspan="6">升{$i}星</td>
                                    </tr>
                                    <tr >
                                        <td class="border">
                                            去系统推荐店铺购买<input type="text" name="system_shop_buy_num{$i}"  value="{$rules['system_shop_buy_num'.$i]}" >单
                                            金额不低于<input type="text" name="system_shop_buy_price{$i}" value="{$rules['system_shop_buy_price'.$i]}" >元
                                        </td>
                                        <td class="border">
                                            获得<input type="text" name="system_shop_get_order{$i}"  value="{$rules['system_shop_get_order'.$i]}" >个订单
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="border">
                                            去直接推荐人购买<input type="text" name="father_shop_buy_num{$i}" value="{$rules['father_shop_buy_num'.$i]}" >单
                                            金额不低于<input type="text" name="father_shop_buy_price{$i}" value="{$rules['system_shop_buy_price'.$i]}" >元
                                        </td>
                                        <td class="border">
                                            获得<input type="text" name="system_shop_get_friends{$i}"  value="{$rules['system_shop_get_friends'.$i]}" >个客户
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="border">
                                            培养<input type="text" name="team_num{$i}" value="{$rules['team_num'.$i]}" >个
                                           <input type="text" name="grade_num{$i}" value="{$rules['grade_num'.$i]}" >星会员
                                        </td>
                                        <td class="border">
                                            获得<input type="text" name="system_shop_get_paidan{$i}"  value="{$rules['system_shop_get_paidan'.$i]}" >个派单
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="border">
                                            积分不少于<input type="text" name="promotion_credit{$i}" value="{$rules['promotion_credit'.$i]}" >分
                                        </td>
                                        <td class="border">
                                            赠送<input type="text" name="system_shop_get_credit{$i}"  value="{$rules['system_shop_get_credit'.$i]}" >积分
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="border" colspan="6">
                                            <p> <small class="text-danger">派给多个星级空格分隔如：1 2 3 4 5</small></p>
                                            订单派给团队<input type="text" name="send_order_to{$i}"  value="{$rules['send_order_to'.$i]}" >星会员
                                        </td>
                                    </tr>
                                </table>
                                {/for}
                                <table class="table table-hover">
                                    <tr >
                                        <td class="border">
                                            <select name="open_shop_num" >
                                                {for start="1" end="10"}
                                                    {if condition="$i eq $rules['open_shop_num']"}
                                                    <option value="{$i}" selected>{$i}星级</option>
                                                    {else}
                                                    <option value="{$i}">{$i}星级</option>
                                                    {/if}
                                                {/for}
                                            </select>
                                           星级可以开通店铺
                                        </td>
                                        <td class="border">
                                            <select name="add_product_num" >
                                                {for start="1" end="10"}
                                                {if condition="$i eq $rules['add_product_num']"}
                                                <option value="{$i}" selected>{$i}星级</option>
                                                {else}
                                                <option value="{$i}">{$i}星级</option>
                                                {/if}
                                                {/for}
                                            </select>
                                            星级可以上传自己产品
                                        </td>
                                    </tr>

                                </table>
                                <table class="table table-hover">
                                    <tr class="text-center">
                                        <td class="border" rowspan="5"><input type="submit" value="提交" class="btn btn-primary"></td>
                                    </tr>
                                </table>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>


{/block}